using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace Webber
{
    static class ONColorMap
    {
        private static Hashtable m_PageColor;
        private static Hashtable m_ColorName;

        static ONColorMap()
        {
            m_PageColor = new Hashtable();
            m_ColorName = new Hashtable();

            // initialize page colors for each OneNote section color
            m_PageColor.Add("#8AA8E4","#C4D3F1");
            m_PageColor.Add("#FFD869","#FFEAB3");
            m_PageColor.Add("#B7C997","#DBE4CB");
            m_PageColor.Add("#EE9597","#F5C9CA");
            m_PageColor.Add("#B49EDE","#D8CDED"); 
            m_PageColor.Add("#91BAAE","#C7DBD5"); 
            m_PageColor.Add("#F6B078","#F9D6BA");
            m_PageColor.Add("#D5A4BB","#E9D0DC");
            m_PageColor.Add("#9BBBD2","#CCDCE7");
            m_PageColor.Add("#AB9CB7","#D4CCDA");
            m_PageColor.Add("#E8D199","#F2E7CB");
            m_PageColor.Add("#F5F96F","#F9FBB6");
            m_PageColor.Add("#ADE792","#D5F2C7");
            m_PageColor.Add("#4DBCCA","#A6DDE4");
            m_PageColor.Add("#BA7575","#DCBABA");
            m_PageColor.Add("#9595AA","#CACAD4");

            // initialize color names for each OneNote section color
            m_ColorName.Add("#8AA8E4", "Blue");
            m_ColorName.Add("#FFD869", "Yellow");
            m_ColorName.Add("#B7C997", "Green");
            m_ColorName.Add("#EE9597", "Red");
            m_ColorName.Add("#B49EDE", "Purple");
            m_ColorName.Add("#91BAAE", "Cyan");
            m_ColorName.Add("#F6B078", "Orange");
            m_ColorName.Add("#D5A4BB", "Magenta");
            m_ColorName.Add("#9BBBD2", "BlueMist");
            m_ColorName.Add("#AB9CB7", "PurpleMist");
            m_ColorName.Add("#E8D199", "Tan");
            m_ColorName.Add("#F5F96F", "Lemon");
            m_ColorName.Add("#ADE792", "Apple");
            m_ColorName.Add("#4DBCCA", "Teal");
            m_ColorName.Add("#BA7575", "RedChalk");
            m_ColorName.Add("#9595AA", "Silver");           
        }

        public static string GetPageHexColor(string SectionColor)
        {
            if (m_PageColor.ContainsKey(SectionColor))
            {
                return m_PageColor[SectionColor].ToString();
            }
            else
            {
                return "";
            }
        }

        public static string GetColorName(string SectionColor)
        {
            if (m_ColorName.ContainsKey(SectionColor))
            {
                return m_ColorName[SectionColor].ToString();
            }
            else
            {
                return "";
            }
        }
    }
}
